
def copy_img(src_path,copy_path):

    if src_path.endswith('.PNG'):
        src = open(src_path, 'rb')
        content = src.read()
        path=(copy_path+'.png')
        copy = open(path, 'wb')
        copy.write(content)
        src.close()
        copy.close()

    elif src_path.endswith('.JPG'):

        src = open(src_path, 'rb')
        content = src.read()
        path=(copy_path+'.png')
        copy = open(path, 'wb')
        copy.write(content)
        src.close()
        copy.close()

    elif src_path.endswith('.jpg'):

        src = open(src_path, 'rb')
        content = src.read()
        path=(copy_path+'.png')
        copy = open(path, 'wb')
        copy.write(content)
        src.close()
        copy.close()

    elif src_path.endswith('.png'):

        src = open(src_path, 'rb')
        content = src.read()
        path=(copy_path+'.png')
        copy = open(path, 'wb')
        copy.write(content)
        src.close()
        copy.close()
    return path

def copy_out(src_path,copy_path):
    src = open(src_path, 'rb')
    content = src.read()
    path = (copy_path)
    copy = open(path, 'wb')
    copy.write(content)
    src.close()
    copy.close()